// 封装接口的引入
import request from '@/utils/request'

// /company/department 组织架构，列表的查询
export function getDepartmentList() {
  return request({
    url: '/company/department'
  })
}

// 公司员工所有的员工姓名 /sys/user/simple
export function getSimpleList() {
  return request({
    url: '/sys/user/simple'
  })
}
// 添加部分接口封装/company/department
export function addDepts(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 删除数据的接口
export function delDepts(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 根据id获取部门详情 /company/department/{id}
export function getDepartmentData(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 根据id编辑数据  /company/department/{id}
export function editDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

